package com.linln.wtp.validator;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.linln.component.excel.annotation.Excel;
import com.linln.component.excel.enums.ExcelType;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.util.Date;

@Data
public class WxUserValid {

    @NotEmpty(message = "用户名不能为空")
    private String username;
    @NotEmpty(message = "真实姓名不能为空")
    private String nickname;
    @NotEmpty(message = "性别不能为空")
    private Byte sex;
    @NotEmpty(message = "头像不能为空")
    private String headImg;

    @Pattern(regexp = "^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$|^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}([0-9]|X)$", message = "证件号格式不正确")
    private String idcard;

    @NotEmpty(message = "生日不能为空")
    private String birthday;
}
